package Template;
use lib '/home/'.$ENV{HOSTUSER}.'/djpp/core/service/Template';
use HTMLTemplateProTemplate;
use Moose;

has path	=> ( is => 'ro', default => sub { [] } );
has engine => ( is => 'ro' );

sub new 
{
	my $class = shift;
	
	my $self = bless { @_ }, $class;
	
	$self->_init;
	
	return $self;	
}

sub _init
{
	my $self = shift;

	$self->{engine} = new HTMLTemplateProTemplate() unless $self->{engine};
	
	$self->{engine}->set_path( $self->path );	
}

sub get
{
	my ( $self, $tmplname) = @_;
	
	$self->{engine}->get($tmplname);
	
	return $self->{engine};
}
1;
